package model;

import view.TextScreen;

import java.util.Observable;

/**
 * Created with IntelliJ IDEA.
 * User: phuc_lagger
 * Date: 11/10/13
 * Time: 4:04 PM
 * To change this template use File | Settings | File Templates.
 */
public class Point extends Observable {
    public int x;
    public int y;
    public char c = '.';

    public Point(int x, int y, char c) {
        this.x = x;
        this.y = y;
        this.c = c;
    }

    public Point(int x, int y) {
        this.x = x;
        this.y = y;
        this.c = '.';
    }

    public void draw(TextScreen screen) {
        screen.setChar(x, y, c);
    }

    public void moveLeft() {
        this.x -= 1;

    }

    public void moveRight() {
        x += 1;
    }

    public String getinfo() {
        return x + " " + y + " " + c;
    }

    public Point getLocation(){
        return this;
    }

    public void move(){
        this.y--;
    }
}
